﻿<%@ Page Language="C#" MasterPageFile="~/Admin.master" Theme="Admin" AutoEventWireup="true" CodeFile="AManageFeature.aspx.cs" Inherits="Pages_AManageFeature" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="PageStyle">
        <div class="Content">
            <div class="HeaderStyle">
                <span class="Title1">Feature's managent</span>
                <div class="HeadLine"></div>
            </div>
            <div class="FormStyle">
                <div class="r1empty"></div>
                <asp:GridView ID="gv" GridLines="None" runat="server" AutoGenerateColumns="False"
                    DataKeyNames="FeaID" CellPadding="0" AllowPaging="True" CssClass="GridStyle"
                    AllowSorting="True" DataSourceID="odsCate" OnRowCommand="executeCommand">
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <input id="ckLeader" type="checkbox" runat="server" class="ckLeader" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <input id="ckMember" type="checkbox" runat="server" class="ckMember" />
                            </ItemTemplate>
                            <ItemStyle CssClass="RowCell" HorizontalAlign="Center"/>
                            <HeaderStyle CssClass="HeaderCell" Width="20px" HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ID">
                            <ItemTemplate>
                                <%# Eval("FeaID")%>
                            </ItemTemplate>
                            <ItemStyle CssClass="RowCell"/>
                            <HeaderStyle CssClass="HeaderCell" Width="100px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="T&#234;n">
                            <ItemTemplate>
                                <%# Eval("TEN") %>
                            </ItemTemplate>
                            <ItemStyle CssClass="RowCell" />
                            <HeaderStyle CssClass="HeaderCell" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="btEdit" CausesValidation="false" Text="Edit" runat="server" CommandName="cmdEdit"
                                    CommandArgument='<%# Eval("FeaID") %>'></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" CssClass="RowCell" />
                            <HeaderStyle CssClass="HeaderCell" Width="100px" />
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle CssClass="GridRow" />
                    <AlternatingRowStyle CssClass="GridAltRow" />
                    <HeaderStyle CssClass="GridHeader" />
                    <FooterStyle CssClass="GridFooter" />
                    <PagerStyle CssClass="GridPager" />
                </asp:GridView>
                <asp:ObjectDataSource ID="odsCate" runat="server" SelectMethod="getFeatures" TypeName="Jewelry.BussinessLayer.ProductBLL"
                    OnObjectCreating="odsCateCreating" OnSelected="odsCateSelected"></asp:ObjectDataSource>
                <asp:CustomValidator ID="cval" runat="server" ValidationGroup="cate" Display="Dynamic"></asp:CustomValidator>
                <div class="r1empty">
                </div>
                <div class="ButtonStyle">
                    <asp:Button ID="btAddNew" runat="server" Text="Add new" OnClick="clickAdd" />
                    <asp:Button ID="btDelete" runat="server" Text="Delete" OnClick="clickDelete" OnClientClick="javascript:return confirmDel()" />
                </div>
            </div>
            <div class="FooterStyle">
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(document).ready(function(){
            $("#<%= gv.ClientID %>").checkall({
                leaderClass: 'ckLeader',
		        memberClass: 'ckMember'
            });
        });
        function confirmDel()
        {
            var conf = confirm("Bạn có muốn xóa?");
            return conf;
        }
    </script>
</asp:Content>

